import React from 'react';
import {Button} from 'antd-mobile';

class MLoading extends React.PureComponent {
	constructor(props){
		super(props);
	}
	
	render(){
		let {text,reload,reloadFunc} = this.props;
		// text = text || "正在加载配置"
		return <div data-flex="dir:top main:center cross:center" style={{height:"100%"}} >
			<span style={{
				textAlign:"center",
				fontSize:"20px",
				fontWeight:500
			}}>{text}</span>
			{
				reload&&<Button size='small' type="primary" style={{marginTop:"0.5rem"}} onClick={()=>{
					reloadFunc&&reloadFunc()
				}}>重新加载</Button>
			}
		</div>
	}
}
export default MLoading;
